import 'package:flutter_ohos/app/utils/log_utils.dart';
import 'package:get/get.dart';

import 'six_state.dart';

class SixLogic extends GetxController {
  final SixState state = SixState();

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
  }

  @override
  void onReady() {
    // TODO: implement onReady
    super.onReady();
    getParams();
  }

  @override
  void onClose() {
    // TODO: implement onClose
    super.onClose();
  }

  void getParams() {
    Map? parames = Get.arguments;
    if (parames != null) {
      if (parames["title"] != null) {
        LogUtils.d("sixpage parames = ${parames["title"]}");
        state.title = parames["title"];
        update();
      }
    }
  }

  void changeTitle() {
    state.title = "change";
    update();
  }
}
